<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                template="/WEB-INF/template.xhtml">

    <ui:define name="title">
        Charts <span class="subitem">Interactive</span>
    </ui:define>

    <ui:define name="description">
        When a dataset data is clicked, information can be passed to a backing bean using itemSelect ajax behavior.
    </ui:define>

    <ui:param name="documentationLink" value="/components/charts?id=interactive-chart"/>
    <ui:param name="widgetLink" value="BaseChart-1"/>

    <ui:define name="implementation">
        <p:staticMessage severity="warn" summary="DEPRECATED" detail="Please use the new p:chart component" styleClass="w-full mb-2" />
        <div class="card">
            <h:form>
                <p:growl id="growl" showDetail="true"/>

                <p:barChart model="#{chartJsView.barModel2}" style="width: 100%; height: 500px;">
                    <p:ajax event="itemSelect" listener="#{chartJsView.itemSelect}" update="growl"/>
                </p:barChart>
            </h:form>
        </div>
    </ui:define>

</ui:composition>
